//
//  LEINavigationController.m
//  YiMeiXuan
//
//  Created by app on 2017/9/23.
//  Copyright © 2017年 LEI. All rights reserved.
//

#import "LEINavigationController.h"
@interface LEINavigationController ()

@end

@implementation LEINavigationController

- (void)viewDidLoad {
    [super viewDidLoad];
    

//
    [[UINavigationBar appearance]setTintColor:[UIColor whiteColor]];
    [[UINavigationBar appearance] setBarTintColor:MainColor];
    [[UINavigationBar appearance]setTitleTextAttributes:
     @{NSFontAttributeName:[UIFont systemFontOfSize:17],
       NSForegroundColorAttributeName:[UIColor whiteColor]}];
//    [[UIBarButtonItem appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor whiteColor]} forState:UIControlStateNormal];
//        [[UIBarButtonItem appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor whiteColor]} forState:UIControlStateHighlighted];

}

- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated
{
    if (self.viewControllers.count > 0) {

        viewController.hidesBottomBarWhenPushed = YES;
        CATransition *animation = [CATransition animation];
        animation.duration = 0.15f;
        animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
        animation.type = kCATransitionPush;
        animation.subtype = kCATransitionFromRight;
        [self.view.layer addAnimation:animation forKey:nil];
        [super pushViewController:viewController animated:NO];
        return;
    }



    [super pushViewController:viewController animated:YES];

}
//-(UIViewController *)popViewControllerAnimated:(BOOL)animated{
//
//    return [super popViewControllerAnimated:animated];
//
//}
//-(UIBarButtonItem *)rt_customBackItemWithTarget:(id)target action:(SEL)action{
//    UIBarButtonItem *backItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"return_icon"] style:UIBarButtonItemStylePlain target:target action:action];
//    return backItem;
//
//
//}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];


}


@end
